package com.parking.carsystem.parkingchargesystem.module;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

public class GroupListModule implements Parcelable{

    /**
     * msg : 操作成功
     * code : 200
     * data : [{"searchValue":null,"createBy":null,"createTime":"2020-01-09 10:33:06","updateBy":null,"updateTime":null,"remark":null,"dataScope":null,"id":"7d65958b17854c04a9dc4e8303965960","groupName":"我的爱车","userId":"a64146df70ad44bf8d4e8c6a49dedd3b","order":0,"ext":null,"vehicles":[{"searchValue":null,"createBy":null,"createTime":"2020-03-12 18:23:39","updateBy":null,"updateTime":null,"remark":null,"dataScope":null,"id":"89d5dd31-644b-11ea-aee4-1b41f60f68da","plateNumber":"沪444777","plateColor":1,"vehicleType":null,"vehicleOwner":null,"vehicleOwnerId":null,"vehicleOwnerPhone":null,"unconsciousPay":false},{"searchValue":null,"createBy":null,"createTime":"2020-03-12 18:22:37","updateBy":null,"updateTime":null,"remark":null,"dataScope":null,"id":"64dbcc72-644b-11ea-aee4-1b41f60f68da","plateNumber":"津E34456","plateColor":1,"vehicleType":null,"vehicleOwner":null,"vehicleOwnerId":null,"vehicleOwnerPhone":null,"unconsciousPay":false},{"searchValue":null,"createBy":null,"createTime":"2020-03-12 18:25:09","updateBy":null,"updateTime":null,"remark":null,"dataScope":null,"id":"bff8c36b-644b-11ea-aee4-1b41f60f68da","plateNumber":"渝D55555","plateColor":1,"vehicleType":null,"vehicleOwner":null,"vehicleOwnerId":null,"vehicleOwnerPhone":null,"unconsciousPay":false},{"searchValue":null,"createBy":null,"createTime":"2020-03-12 18:24:48","updateBy":null,"updateTime":null,"remark":null,"dataScope":null,"id":"b36537e7-644b-11ea-aee4-1b41f60f68da","plateNumber":"渝R33333","plateColor":1,"vehicleType":null,"vehicleOwner":null,"vehicleOwnerId":null,"vehicleOwnerPhone":null,"unconsciousPay":false},{"searchValue":null,"createBy":null,"createTime":"2020-01-13 16:29:37","updateBy":null,"updateTime":null,"remark":null,"dataScope":null,"id":"d7228fbf-35de-11ea-90e6-c4caaaf1bbd4","plateNumber":"粤A99998","plateColor":0,"vehicleType":null,"vehicleOwner":null,"vehicleOwnerId":null,"vehicleOwnerPhone":null,"unconsciousPay":false},{"searchValue":null,"createBy":null,"createTime":"2019-12-29 16:55:26","updateBy":null,"updateTime":null,"remark":null,"dataScope":null,"id":"ffa67072-2a18-11ea-ae50-1c394740d5d2","plateNumber":"粤A99999","plateColor":0,"vehicleType":0,"vehicleOwner":"秦倩","vehicleOwnerId":"c24973aa41ac45d7a9b7a28c1f1bb6ef","vehicleOwnerPhone":"18020106876","unconsciousPay":false},{"searchValue":null,"createBy":null,"createTime":"2020-03-12 18:17:01","updateBy":null,"updateTime":null,"remark":null,"dataScope":null,"id":"9cca2e3d-644a-11ea-aee4-1b41f60f68da","plateNumber":"豫Q34668","plateColor":1,"vehicleType":null,"vehicleOwner":null,"vehicleOwnerId":null,"vehicleOwnerPhone":null,"unconsciousPay":false},{"searchValue":null,"createBy":null,"createTime":"2020-03-12 18:19:53","updateBy":null,"updateTime":null,"remark":null,"dataScope":null,"id":"0340142b-644b-11ea-aee4-1b41f60f68da","plateNumber":"青666666","plateColor":1,"vehicleType":null,"vehicleOwner":null,"vehicleOwnerId":null,"vehicleOwnerPhone":null,"unconsciousPay":false}]},{"searchValue":null,"createBy":null,"createTime":"2020-01-14 10:43:56","updateBy":null,"updateTime":null,"remark":null,"dataScope":null,"id":"e7a4428634114699b1e910f601ee924e","groupName":"朋友的车","userId":"a64146df70ad44bf8d4e8c6a49dedd3b","order":1,"ext":null,"vehicles":[{"searchValue":null,"createBy":null,"createTime":"2020-01-14 10:52:31","updateBy":null,"updateTime":null,"remark":null,"dataScope":null,"id":"e83bc398-3678-11ea-a6b0-304ffbfcfe02","plateNumber":"豫Q88888","plateColor":1,"vehicleType":null,"vehicleOwner":null,"vehicleOwnerId":null,"vehicleOwnerPhone":null,"unconsciousPay":false}]},{"searchValue":null,"createBy":null,"createTime":"2020-01-14 11:01:19","updateBy":null,"updateTime":"2020-01-14 14:40:50","remark":null,"dataScope":null,"id":"138a4ade72424ee9afe78322257ee8ec","groupName":"家人的车卡口","userId":"a64146df70ad44bf8d4e8c6a49dedd3b","order":2,"ext":null,"vehicles":[{"searchValue":null,"createBy":null,"createTime":"2020-01-14 11:01:39","updateBy":null,"updateTime":null,"remark":null,"dataScope":null,"id":"2f2c9d15-367a-11ea-a6b0-304ffbfcfe02","plateNumber":"苏A66777","plateColor":2,"vehicleType":null,"vehicleOwner":null,"vehicleOwnerId":null,"vehicleOwnerPhone":null,"unconsciousPay":false}]}]
     */

    public String msg;
    public int code;
    public List<DataBean> data;

    protected GroupListModule(Parcel in) {
        msg = in.readString();
        code = in.readInt();
        data = in.createTypedArrayList(DataBean.CREATOR);
    }

    public static final Creator<GroupListModule> CREATOR = new Creator<GroupListModule>() {
        @Override
        public GroupListModule createFromParcel(Parcel in) {
            return new GroupListModule(in);
        }

        @Override
        public GroupListModule[] newArray(int size) {
            return new GroupListModule[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(msg);
        dest.writeInt(code);
        dest.writeTypedList(data);
    }

    public static class DataBean implements Parcelable{
        /**
         * searchValue : null
         * createBy : null
         * createTime : 2020-01-09 10:33:06
         * updateBy : null
         * updateTime : null
         * remark : null
         * dataScope : null
         * id : 7d65958b17854c04a9dc4e8303965960
         * groupName : 我的爱车
         * userId : a64146df70ad44bf8d4e8c6a49dedd3b
         * order : 0
         * ext : null
         * vehicles : [{"searchValue":null,"createBy":null,"createTime":"2020-03-12 18:23:39","updateBy":null,"updateTime":null,"remark":null,"dataScope":null,"id":"89d5dd31-644b-11ea-aee4-1b41f60f68da","plateNumber":"沪444777","plateColor":1,"vehicleType":null,"vehicleOwner":null,"vehicleOwnerId":null,"vehicleOwnerPhone":null,"unconsciousPay":false},{"searchValue":null,"createBy":null,"createTime":"2020-03-12 18:22:37","updateBy":null,"updateTime":null,"remark":null,"dataScope":null,"id":"64dbcc72-644b-11ea-aee4-1b41f60f68da","plateNumber":"津E34456","plateColor":1,"vehicleType":null,"vehicleOwner":null,"vehicleOwnerId":null,"vehicleOwnerPhone":null,"unconsciousPay":false},{"searchValue":null,"createBy":null,"createTime":"2020-03-12 18:25:09","updateBy":null,"updateTime":null,"remark":null,"dataScope":null,"id":"bff8c36b-644b-11ea-aee4-1b41f60f68da","plateNumber":"渝D55555","plateColor":1,"vehicleType":null,"vehicleOwner":null,"vehicleOwnerId":null,"vehicleOwnerPhone":null,"unconsciousPay":false},{"searchValue":null,"createBy":null,"createTime":"2020-03-12 18:24:48","updateBy":null,"updateTime":null,"remark":null,"dataScope":null,"id":"b36537e7-644b-11ea-aee4-1b41f60f68da","plateNumber":"渝R33333","plateColor":1,"vehicleType":null,"vehicleOwner":null,"vehicleOwnerId":null,"vehicleOwnerPhone":null,"unconsciousPay":false},{"searchValue":null,"createBy":null,"createTime":"2020-01-13 16:29:37","updateBy":null,"updateTime":null,"remark":null,"dataScope":null,"id":"d7228fbf-35de-11ea-90e6-c4caaaf1bbd4","plateNumber":"粤A99998","plateColor":0,"vehicleType":null,"vehicleOwner":null,"vehicleOwnerId":null,"vehicleOwnerPhone":null,"unconsciousPay":false},{"searchValue":null,"createBy":null,"createTime":"2019-12-29 16:55:26","updateBy":null,"updateTime":null,"remark":null,"dataScope":null,"id":"ffa67072-2a18-11ea-ae50-1c394740d5d2","plateNumber":"粤A99999","plateColor":0,"vehicleType":0,"vehicleOwner":"秦倩","vehicleOwnerId":"c24973aa41ac45d7a9b7a28c1f1bb6ef","vehicleOwnerPhone":"18020106876","unconsciousPay":false},{"searchValue":null,"createBy":null,"createTime":"2020-03-12 18:17:01","updateBy":null,"updateTime":null,"remark":null,"dataScope":null,"id":"9cca2e3d-644a-11ea-aee4-1b41f60f68da","plateNumber":"豫Q34668","plateColor":1,"vehicleType":null,"vehicleOwner":null,"vehicleOwnerId":null,"vehicleOwnerPhone":null,"unconsciousPay":false},{"searchValue":null,"createBy":null,"createTime":"2020-03-12 18:19:53","updateBy":null,"updateTime":null,"remark":null,"dataScope":null,"id":"0340142b-644b-11ea-aee4-1b41f60f68da","plateNumber":"青666666","plateColor":1,"vehicleType":null,"vehicleOwner":null,"vehicleOwnerId":null,"vehicleOwnerPhone":null,"unconsciousPay":false}]
         */

        public Object searchValue;
        public Object createBy;
        public String createTime;
        public Object updateBy;
        public Object updateTime;
        public Object remark;
        public Object dataScope;
        public String id;
        public String groupName;
        public String userId;
        public boolean chooseStatus;
        public int order;
        public Object ext;
        public ArrayList<VehiclesBean> vehicles;

        public DataBean() {
        }

        protected DataBean(Parcel in) {
            createTime = in.readString();
            id = in.readString();
            groupName = in.readString();
            userId = in.readString();
            order = in.readInt();
            vehicles = in.createTypedArrayList(VehiclesBean.CREATOR);
            chooseStatus = in.readByte() != 0;
        }

        public static final Creator<DataBean> CREATOR = new Creator<DataBean>() {
            @Override
            public DataBean createFromParcel(Parcel in) {
                return new DataBean(in);
            }

            @Override
            public DataBean[] newArray(int size) {
                return new DataBean[size];
            }
        };

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(createTime);
            dest.writeString(id);
            dest.writeString(groupName);
            dest.writeString(userId);
            dest.writeInt(order);
            dest.writeTypedList(vehicles);
            dest.writeByte((byte) (chooseStatus ? 1 : 0));
        }

        public static class VehiclesBean implements Parcelable{
            /**
             * searchValue : null
             * createBy : null
             * createTime : 2020-03-12 18:23:39
             * updateBy : null
             * updateTime : null
             * remark : null
             * dataScope : null
             * id : 89d5dd31-644b-11ea-aee4-1b41f60f68da
             * plateNumber : 沪444777
             * plateColor : 1
             * vehicleType : null
             * vehicleOwner : null
             * vehicleOwnerId : null
             * vehicleOwnerPhone : null
             * unconsciousPay : false
             */

            public Object searchValue;
            public Object createBy;
            public String createTime;
            public Object updateBy;
            public Object updateTime;
            public Object remark;
            public Object dataScope;
            public String id;
            public String parentId;
            public String plateNumber;
            public int plateColor;
            public Object vehicleType;
            public Object vehicleOwner;
            public String vehicleOwnerId;
            public Object vehicleOwnerPhone;
            public boolean unconsciousPay;
            public boolean type;
            public String itemType;
            public boolean chooseItem;

            public VehiclesBean() {
            }

            public VehiclesBean(Parcel in) {
                createTime = in.readString();
                vehicleOwnerId = in.readString();
                id = in.readString();
                parentId = in.readString();
                itemType = in.readString();
                plateNumber = in.readString();
                plateColor = in.readInt();
                unconsciousPay = in.readByte() != 0;
                type = in.readByte() != 0;
                chooseItem = in.readByte() != 0;
            }

            public static final Creator<VehiclesBean> CREATOR = new Creator<VehiclesBean>() {
                @Override
                public VehiclesBean createFromParcel(Parcel in) {
                    return new VehiclesBean(in);
                }

                @Override
                public VehiclesBean[] newArray(int size) {
                    return new VehiclesBean[size];
                }
            };

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeString(createTime);
                dest.writeString(vehicleOwnerId);
                dest.writeString(id);
                dest.writeString(parentId);
                dest.writeString(itemType);
                dest.writeString(plateNumber);
                dest.writeInt(plateColor);
                dest.writeByte((byte) (unconsciousPay ? 1 : 0));
                dest.writeByte((byte) (type ? 1 : 0));
                dest.writeByte((byte) (chooseItem ? 1 : 0));
            }
        }
    }
}
